home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample SMSAM / SampleSMSAM Source / 2020HalfGateway / 2020Recipient.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-28  |  4.1 KB  |  134 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        2020Recipient.h
  3.  
  4.     Copyright:    © 1991-1994 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Part of the AOCE Sample SMSAM Package.  Consult the license
  8.     which came with this software for your specific legal rights.
  9.  
  10. */
  11.  
  12.  
  13.  
  14. #ifndef __2020RECIPIENT__
  15. #define __2020RECIPIENT__
  16.  
  17. #ifndef __BLJSTANDARDINCLUDES__
  18. #include "BLJStandardIncludes.h"
  19. #endif
  20.  
  21. #ifndef __OCEMAIL__
  22. #include <OCEMail.h>
  23. #endif
  24.  
  25. #ifndef __RECIPIENT__
  26. #include "Recipient.h"
  27. #endif
  28.  
  29. class T2020Letter;
  30.  
  31. /***********************************|****************************************/
  32.  
  33. class T2020Recipient : public TRecipient
  34. {
  35. //    Constructors
  36. public:
  37.                                     T2020Recipient(T2020Letter* letter, const OCEPackedRecipient*,
  38.                                                     unsigned short originalRecipientIndex,
  39.                                                     Boolean responsible = false,
  40.                                                     Boolean marked = false);
  41.                                     virtual ~T2020Recipient();
  42.  
  43. public:
  44.  
  45.         //    Recipient Name/Type or CID Methods
  46.         //    ==================================
  47.         virtual Boolean             GetRecipientName (TRString& name) const;
  48.         virtual Boolean                GetRecipientType (TRString& type) const;
  49.  
  50.         virtual Boolean             GetCID (CreationID& cid) const;
  51.         
  52.         //    Path Information
  53.         //    ================
  54.         virtual Boolean                IsPathInfoPresent () const;    //    return true if the recipient has any path information
  55.         virtual Boolean                IsPathInfoOptional () const; // return true if the path info is present but not required
  56.         virtual Boolean                IsNameAndPathUnique () const; // return true if the name & path info uniquely identify a recipient
  57.  
  58.         virtual Boolean             GetPathDNode (unsigned long& dNode) const;
  59.         
  60.         virtual unsigned short         GetPathNameCount () const;
  61.         virtual void                 GetPathNameItem (unsigned short item, TRString& nodeName) const;
  62.     
  63.         virtual Boolean             GetDirectoryName (DirectoryName& directoryName) const;
  64.  
  65.         //    Recipient Extension Data
  66.         //    ======================
  67.         virtual Boolean                IsAddressTypePresent () const;    // return true if an address type is present
  68.         virtual OSType                 GetAddressType () const;
  69.         virtual unsigned long         GetExtensionDataSize () const;
  70.         virtual void                 GetExtensionData (unsigned long offset, void *buffer, unsigned long bufferSize) const;
  71.     
  72.         //    Recpient Status
  73.         //    ===============
  74.         virtual Boolean             GetResponsible() const; // return true if responsible for this recipient, false otherwise
  75.         virtual Boolean             SetStatus ( RecipientStatusSet ); // set recipient status
  76.         virtual RecipientStatusSet     GetStatus () const; // get recipient status
  77.     
  78.         //    For debugging purposes
  79.         virtual ostream&             DescribeSubclass( ostream& ) const;
  80.         virtual ostream&             operator >> ( ostream& ) const;
  81.  
  82. //    Additional functions, only usable if a T2020Recipient * is being referenced
  83. public:
  84.         void                         SetOriginalRecipientIndex ( unsigned short index );
  85.         unsigned short                 GetOriginalRecipientIndex() const;
  86.     
  87.         void                         SetResolvedRecipientIndex ( unsigned short index );
  88.         unsigned short                 GetResolvedRecipientIndex() const;
  89.     
  90.         void                         SetResponsible ( Boolean responsible );
  91.     
  92.         //    Return true if the recipient only exists in the resolved recipient list.
  93.         Boolean                     GetHidden () const;
  94.         void                         SetHidden ( Boolean hidden );
  95.     
  96.         Boolean                     GetOCERecipient( OCERecipient& oceRecipient ) const;
  97.  
  98. #if 0
  99.         T2020Letter*                GetOwningLetter ( ) const;
  100.         T2020HalfGateway*            GetOwningHalfGateway ( ) const;
  101. #endif
  102.  
  103. private:
  104.         T2020Letter*                 fOwningLetter;
  105.         
  106.         #if 0
  107.         OCEPackedRecipient*            fOCEPackedRecipient;
  108.         OCERecipient                fOCERecipient;
  109.         RecordID*                    fRecordID;
  110.         RLI*                        fRLI;
  111.         PackedPathNamePtr            fPackedPathNamePtr; // only used if there is no packed path in the RLI itself.
  112.         unsigned short                fPathNameItemsCount;
  113.         RStringPtr*                    fPathNameItems;
  114.         #endif
  115.  
  116.         TDSSpec                        fRecipient;
  117.         
  118.         unsigned short                fOriginalRecipientIndex;
  119.         unsigned short                fResolvedRecipientIndex;
  120.         RecipientStatusSet            fStatus;
  121.         
  122.         unsigned                    fResponsible : 1;
  123.         unsigned                    fHidden : 1;
  124.         unsigned                    fCheckedWhetherPathInformationIsOptional : 1;
  125.         unsigned                    fIsPathInfoOptional : 1;
  126.         unsigned                    fCheckedWhetherRecipientNameIsUnique : 1;
  127.         unsigned                    fRecipientNameIsUnique : 1;
  128. };
  129.  
  130. /***********************************|****************************************/
  131.  
  132. #endif    // __2020RECIPIENT__
  133.  
  134.